//
//  HomeCellModel.m
//  MyBlog
//
//  Created by NCS on 16/12/7.
//  Copyright © 2016年 YSL. All rights reserved.
//

#import "HomeCellModel.h"

@implementation HomeCellModel

- (HomeCellModel *)initWithModel:(HomeCellModel *)model {
    self = model;
    self.cellHeight = 0;
    return self;
}

- (HomeCellModel *)initWithData:(NSDictionary *)data {
    self.avatar = [data valueForKey:@"avatar"];
    self.name = [data valueForKey:@"name"];
    self.time = [data valueForKey:@"time"];
    self.device = [data valueForKey:@"device"];
    self.content = [data valueForKey:@"content"];
    self.images = [data valueForKey:@"images"];

    return self;
}

- (HomeCellModel *)initWithData:(NSDictionary *)data indexPath:(NSIndexPath *)indexPath{
    
    self = [self initWithData:data];
    self.indexPath = indexPath;
    self.cellHeight = 0;
    return self;
}

- (HomeCellModel *)initWithData:(NSDictionary *)data height:(CGFloat)cellHeight {
    
    self = [self initWithData:data];
    self.indexPath = [[NSIndexPath alloc] initWithIndex:0];
    self.cellHeight = cellHeight;
    
    return self;
}

@end
